package YAVMM::GuestStat;
use Moose;

extends 'YAVMM::Object';

our $VERSION = '0.01';

has 'name' => (
    documentation => 'Guest name',
    is            => 'rw',
    isa           => 'str',
    required      => 1,
);

has 'timestamp' => (
    documentation => 'Unix timestamp (UTC)',
    is            => 'rw',
    isa           => 'Int',
    default       => sub { DateTime->now(time_zone => 'UTC')->epoch; }
);

has 'host_name' => (
    documentation => 'Name of the host the guest is running on',
    is            => 'rw',
    isa           => 'Str',
    required      => 1,
);

has 'vsz' (
    documentation => 'Virtual memory used by guest (kB)',
    is            => 'rw',
    isa           => 'Int',
    default       => 0,
);

has 'rss' (
    documentation => 'Resident set size, the non-swapped physical memory used (bB)',
    is            => 'rw',
    isa           => 'Int',
    default       => 0,
);

has 'cpu_used' => (
    documentation => 'Percentage of CPU used',
    is            => 'rw',
    isa           => 'Float',
    default       => 0,
);

has 'mem_used' => (
    documentation => 'Percentage of memory used',
    is            => 'rw',
    isa           => 'Float',
    default       => 0,
);

__PACKAGE__->meta->make_immutable;
no Moose;
1;
